In many computing systems, for reasons of speed and memory conservation, software modules are executed “in place.” This technology is generally known as XIP—eXecute In Place. Most types of embedded devices, such as many handheld computing devices, do not have secondary storage such as a hard disk. Therefore, software modules may be stored in non-volatile memory, such as read-only memory (ROM) or flash memory. In classical non-XIP enabled environments, a software module is relocated from its storage location and decompressed into the system's random-access memory (RAM) before execution begins. In XIP-enabled environments, software modules may be executed directly from where they are stored without incurring these relocation/decompression penalties if certain conditions are met. Thus, executing a software module in XIP mode may lead to faster start-times when launching the module as well as decreasing the need for RAM space.
Some devices, such as Intel® Personal Client Architecture (Intel® PCA) based devices, might have two types of flash memory devices: an “internal flash memory” and an “external flash memory.” “Internal flash memory” is a type of non-volatile memory having superior performance characteristics. Internal flash memory is typically located in close proximity to a processor, such as a microprocessor, and may be embedded with the processor. “External flash memory” is a type of non-volatile memory having performance characteristics which are less favorable than internal flash memory. External flash memory is typically located farther away from the processor than the internal flash memory and is typically accessed via a memory bus.
The read and write latencies associated with internal flash memory are much shorter than the corresponding latencies associated with external flash memory. Consequently, XIP applications located in internal flash memory launch and execute much faster than XIP applications located in external flash memory.
Because internal flash memory tends to be much more expensive than external flash memory, however, a device typically has little internal flash memory available in comparison to the availability of cheaper external flash memory. Thus, only a portion of a device's XIP software modules may be stored in internal flash memory, with the majority of XIP software modules being located in slower external flash memory.
Maintaining “frequently used” XIP modules in the faster internal flash memory while locating a user's less frequently used XIP modules in the slower external memory may lead to a better user experience. Currently, however, the decision of where to locate XIP software modules is made at the time the modules are developed, without knowledge of a user's actual usage. Once the modules are built and deployed they maintain their residence in either internal or external flash memory and cannot be moved from one memory to the other. Thus, the XIP applications are assigned between internal flash memory and external flash memory based upon predicted usage of a typical user, not an individual user's actual usage. Because the set of “frequently used” applications varies from user to user and a particular user's usage-pattern tends to change over time, the location of XIP applications are not optimized for a particular user.